//导入
const low = require('lowdb');
const FileSync = require('lowdb/adapters/FileSync')
 
const adapter = new FileSync('db.json')
//获取db对象;
const db = low(adapter);
db.defaults({ posts: [], user: {} }).write();